package com.dzsw.duplicatedata;

import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;

/**
 * @author sunz
 * @version 1.0
 * @CreateTime 2021-04-21-16:16
 */
public class LinkedHashSetMain {

    public static void main(String[] args) {
        // 应该是比较了所有项
        List<SampleBean> list = DuplicateDataHelper.getData();
        LinkedHashSet<SampleBean> set = new LinkedHashSet<>(list);
        list = new ArrayList<>(set);
        list.forEach(item -> {
            System.out.println(item.toString());
        });
    }
}
